<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css，js</title>
    <style>
        body {
            text-align: center;
            margin-top: 50px;
        }
        
        button {
            padding: 15px 30px;
            font-size: 18px;
            background-color: lightblue;
            border: none;
            border-radius: 5px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <button id="colorButton" onclick="changeButtonColor()">点我变色</button>

    <script>
        const button = document.getElementById('colorButton');
        const colors = ['lightblue', 'lightgreen', 'lightpink', 'lightyellow', 'lightcoral'];
        function changeButtonColor() {
            const randomIndex = Math.floor(Math.random() * colors.length);
            const newColor = colors[randomIndex];
            button.style.backgroundColor = newColor;
        }
    </script>
</body>
</html>